package com.study.forumsystemproject.model;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.Date;
@Data
@Schema(name = "消息类", description = "描述论坛系统中的私信")
public class Message {
    private Long id;
    @Schema(description = "发送者用户ID",  example = "1001")
    private Long postUserId;
    @Schema(description = "接收者用户ID",  example = "2001")
    private Long receiveUserId;
    @Schema(description = "消息内容", example = "你好，很高兴认识你！")
    private String content;
    @Schema(description = "消息状态", example = "0")
    private Integer state;

    @Schema(description = "删除标志", example = "0")
    private Integer deleteFlag;

    @Schema(description = "创建时间",  example = "2024-01-01T12:00:00Z")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    @Schema(description = "更新时间", example = "2024-01-02T12:00:00Z")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;
    @Schema(description = "关联发送者用户")
    private User postUser;
}